package sg.edu.nus.iss.vmcs.termination.states;

import sg.edu.nus.iss.vmcs.customer.CoinReceiver;
import sg.edu.nus.iss.vmcs.system.DispenseController;
import sg.edu.nus.iss.vmcs.system.TransactionController;
import sg.edu.nus.iss.vmcs.termination.template.Termination;
import sg.edu.nus.iss.vmcs.termination.template.TerminationOnChangeGiving;
import sg.edu.nus.iss.vmcs.termination.template.TerminationOnDispense;
import sg.edu.nus.iss.vmcs.termination.template.TerminationOnStoringCoins;

/*
 * 
 * Priyanka
 */

public class DispenseChangeState extends TerminateState  {
	
	@Override
	public void nextState(TransactionController tc) {
		tc.setCurrentState(new StoringCoinsState());
	}
	
	public void handleTermination(DispenseController dc,CoinReceiver coinRec)
	{		
		Termination terminate=new TerminationOnChangeGiving(coinRec);
		terminate.terminate(dc);
	}
	
	
}
